package org.darkforest.common.services.impl;

import org.darkforest.common.services.OrderGoodsService;
import org.darkforest.dao.mapper.OrderGoodsMapper;
import org.darkforest.model.OrderGoods;
import org.darkforest.model.OrderGoodsSearchBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2015/8/31.
 */
@Service
public class OrderGoodsServiceImpl implements OrderGoodsService {
    @Autowired
    private OrderGoodsMapper orderGoodsMapper;

    /**
     * 根据条件查询订单商品信息
     *
     * @param orderGoods
     * @return
     */
    @Override
    public OrderGoods findOrderGoodsByCond(OrderGoods orderGoods) {
        return orderGoodsMapper.findOrderGoodsByCond(orderGoods);
    }

    @Override
    public List<Map<String, Object>> Top50OrderAmount(OrderGoodsSearchBean goods) {
        return orderGoodsMapper.Top50OrderAmount(goods);
    }

    @Override
    public List<Map<String, Object>> Top50GoodsCount(OrderGoodsSearchBean goods) {
        return orderGoodsMapper.Top50GoodsCount(goods);
    }

    @Override
    public List<Map<String, Object>> goodsSaleDetail(OrderGoodsSearchBean goods) {
        return orderGoodsMapper.goodsSaleDetail(goods);
    }
}
